package com.topway.dsmflex.ui;

import org.eclipse.swt.SWT;

import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;

import com.swtdesigner.SWTResourceManager;





/**
 * 
 * @author liusy 2013-04-28
 *
 */
public class Welcome extends InitFormComposite{
	
	  public static String name = "欢迎使用";
	
	  
	   public int initForm() {
		   return 1;
	   }
	   
	   
   /**
    * Create the composite
    * @param parent
    * @param style
    */
   public Welcome(Composite parent, int style) {
      super(parent, style);
      setBackground(SWTResourceManager.getColor(240, 240, 240));
      setLayout(new FormLayout());

      final Label label1 = new Label(this, SWT.CENTER | SWT.WRAP);
      label1.setImage(SWTResourceManager.getImage(Welcome.class, "/img/welcome.png"));
      label1.setBackground(SWTResourceManager.getColor(240, 240, 240));
      label1.setForeground(SWTResourceManager.getColor(200, 0, 0));
      
      final FormData fd_label1 = new FormData();
      fd_label1.left = new FormAttachment(50, -64);
      fd_label1.top = new FormAttachment(50, -148);
      label1.setLayoutData(fd_label1);

      final Label label = new Label(this, SWT.CENTER | SWT.WRAP);
      label.setBackground(SWTResourceManager.getColor(240, 240, 240));
      label.setForeground(SWTResourceManager.getColor(200, 0, 0));
      label.setFont(SWTResourceManager.getFont("", 28, SWT.NONE));
      
      final FormData fd_label = new FormData();
      fd_label.left = new FormAttachment(50, -260);
      fd_label.top = new FormAttachment(label1, 40);
      label.setLayoutData(fd_label);
      label.setText("欢迎使用需求则数据同步系统");
   }

   @Override
   protected void checkSubclass() {
      // Disable the check that prevents subclassing of SWT components
   }

}
